<?php

namespace addons\csmitsm\library\xcore\xcflow\utils\xcformfields\xcform;

use addons\csmitsm\library\xcore\xcflow\utils\xcformfields\xcform\base\XcflowAField;

class xcform_control_input_date extends XcflowAField
{
    public function getDbfieldColumnType()
    {
        return "date";
    }

    public function assertXcfieldjson()
    {
        $json = $this->fieldjsonobj;
        if (empty($json['xcform_base_inputfieldcode']['value'])) {
            $this->assertRequired("字段编码");
        }
        if (empty($json['xcform_base_xctitle']['value'])) {
            $this->assertRequired("字段名称");
        }
    }

    public function pagevalueToDbvalue($pagevalue)
    {
        return $pagevalue;
    }

    public function dbvalueToPagevalue($dbvalue)
    {
        return $dbvalue;
    }
}
